﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Green.AgileMapper
{
    public interface IObjectMapper<From, To>:ICodeGenerator<From>
    {
       

        /// <summary>
        /// 根据to得到from
        /// </summary>
        /// <param name="to"></param>
        /// <returns></returns>
        From Warp(To to);

        IList<From> Warp(IList<To> to);

        /// <summary>
        /// 根据from包装to
        /// </summary>
        /// <param name="form"></param>
        /// <param name="to"></param>
        void Warp(From form, To to);

        void Warp(IList<From> form, IList<To> to);

        void Warp(IList<From> form, IList<To> to, Func<From, To, bool> equalPredicate);

        void Warp(IList<From> form, IList<To> to, bool isDeleteNotInFromItem);

        void Warp(IList<From> form, IList<To> to, Func<From, To, bool> equalPredicate, bool isDeleteNotInFromItem);

       
    }


}
